GINO Graphics Suite - GINO v9.0  

Straight Lines

The routines for drawing straight lines are:

gDrawLineTo2D(x, y)
gDrawLineBy2D(dx, dy)

For example - to draw a straight line from the point (50.0,20.0) to the point (60.0,80.0) the following statements can be used:

Call gMoveTo2D(50.0,20.0)
Call gDrawLineTo2D(60.0,80.0)

Straight Line Drawing

Alternatively, the following statements can be used:

Call gMoveTo2D(50.0,20.0)
Call gDrawLineBy2D(10.0,60.0)

The following sequence of statements would draw a square of side S, positioned with the bottom left-hand corner at point (X,Y):

[C/C++]
/* Position */
      gMoveTo2D(x, y);
/* Draw bottom line */
      gDrawLineBy2D(s,0.0);
/* Draw right vertical */
      gDrawLineBy2D(0.0,s);
/* Draw top line */
      gDrawLineBy2D(-s,0.0);
/* Draw left vertical */
      gDrawLineBy2D(0.0,-s);
[F90]
! Position
      call gMoveTo2D(x, y)
! Draw bottom line
      call gDrawLineBy2D(s,0.0)
! Draw right vertical
      call gDrawLineBy2D(0.0,s)
! Draw top line
      call gDrawLineBy2D(-s,0.0)
! Draw left vertical
      call gDrawLineBy2D(0.0,-s)

Straight Line Drawing